<!DOCTYPE html>
<html>
<body>
<script src="../../resources/js-test.js"></script>
<a id="testLink"></a>
<script>
description("This tests verifies that HTMLCollection.namedItem() argument is mandatory");

var testLink = document.getElementById("testLink");
var htmlCollection = document.getElementsByTagName("a");
shouldBe("htmlCollection.__proto__", "HTMLCollection.prototype");
shouldBe("htmlCollection.length", "1");
shouldBe("htmlCollection.namedItem('testLink')", "testLink");
shouldThrow("htmlCollection.namedItem()", '"TypeError: Failed to execute \'namedItem\' on \'HTMLCollection\': 1 argument required, but only 0 present."');
</script>
</body>
</html>
